import java.util.Scanner;
public class TextDemo {
    public static void main(String[] args) {
        int count = 0;
        for(int i = 0; i <= 100 ; i++){
            if(i/10 ==9){
                count++;
            }
            if((i % 10)==9){
                count++;
            }
        }
        System.out.println(count);
    }
    public static void main3(String[] args) {
        int year = 1000;
        while(year <=2000){
            if(year % 4 == 0 && year % 100 != 0 || year % 400 == 0){
                System.out.println(year +"is LeapYear");
            }else{
                System.out.println(year +"is not LeapYear");
            }
            year++;
        }

    }
    public static void main2(String[] args) {
        int i = 0;
        int n = 1;
        while(n<=100){
            for ( i = 2; i <= n ; i++) {
                if(n % i == 0){
                    System.out.println(n+"不是素数");
                    break;
                }
            }
            if(i == n){
                System.out.println(n+"是素数");
            }
            n++;
        }

    }
    public static void main1(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入要判断的数字：");
        int n = scanner.nextInt();
        int i = 0;

        for ( i = 2; i <= n-1 ; i++) {
            if(n % i == 0){
                System.out.println(n+"不是素数");
                break;
            }
        }
        if(i == n){
            System.out.println(n+"是素数");
        }
    }
}
